AAP-54119 Fix per-attribute ANY semantics & empty attribute handling #846
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Linked issue: #845
What is being changed?
_process_user_value
:False
.optional-dependencies.dev
inpyproject.toml
.test_claims.py
expectations and add regression cases.Why is this change needed?
The previous implementation folded each value into
has_access_with_join
iteratively, effectively resulting in AND semantics, which caused false negatives when only one match should allow access.Also, empty attributes were not properly handled.
How does this change address the issue?
Type of Change
Testing Instructions
Prerequisites
rye sync --features "rbac,feature_flags,testing,dev"
DJANGO_SETTINGS_MODULE=test_app.sqlite3settings
Steps to Test
Set up the test environment.
Run the following tests:
Verify that all tests pass.
Expected Results
SKIP
).cn
/employeeType
with AND/OR conditions) behave as expected.Additional Context
Required Actions
In version 2.5 this field indicates what will happen if the source system returns a list of attributes instead of a single value. For example, if the source system returns multiple emails for a user and Operation was set to and, all of the given emails must match the Comparison for the trigger to be True.